package com.erp.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result implements Serializable {
    private Integer code;
    private String message;
    private Object object;
    public static Result OK(String message,Object object){
        Result result = new Result();
        result.setMessage(message);
        result.setCode(200);
        result.setObject(object);
        return result;
    }
    public static Result ERROR(String message,Object object){
        Result result = new Result();
        result.setMessage(message);
        result.setCode(400);
        result.setObject(object);
        return result;
    }
}
